
#ifndef _IDETECTORRESULT_H_
#define _IDETECTORRESULT_H_

#include <BMatrix>
#include <BThing>

using namespace BWE;

struct IDetectorResult
{
	bool hasResult = false;
	BVector normalB;
	BVector pointB;
	BReal distance = REAL_LARGE;

	inline void addContactPoint(const BVector& pointB, const BVector& normalB, BReal distance)
	{
		if (distance < this->distance)
		{
			hasResult = true;
			this->pointB = pointB;
			this->normalB = normalB;
			this->distance = distance;
		}
	}
};

#endif
